package com.oracle.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 惜风
 */
@Repository
public interface CheckGroupItemMapper {
    @Insert("insert into t_checkgroup_checkitem values (#{checkGroupId},#{checkItemId})")
    Integer add(@Param("checkGroupId") Integer checkGroupId,@Param("checkItemId") Integer checkItemId);

    @Select("select checkitem_id from t_checkgroup_checkitem where checkgroup_id=#{checkgroupId}")
    List<Integer> findCheckItemIds(Integer checkgroupId);

    @Delete("delete from t_checkgroup_checkitem where checkgroup_i d=#{checkgroupId}")
    Integer deleteRelation(Integer checkgroupId);
}
